﻿@model List<ZhongheCms.Models.GswTblHotelOrder>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="row">
    <div class="col-xs-12 padding-0">
        <div class="widget-box">
            <div class=" widget-header widget-header-flat" style="padding-left: 0px">
                @*<a href="/BaseInfo/Create/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&r=@ViewBag.r"><span class="btn btn-small btn-info no-border">
                        <i class="fa fa-plus-circle bigger-130"></i>&nbsp;<span class="bigger-110">新增</span><span  class="bigger-110">@ViewBag.f  @if (!string.IsNullOrEmpty(ViewBag.p))
                                                                                                                                                  {
                            <span>(@ViewBag.p)</span>
                                                                                                                                                  }</span></span>
                    </a>*@
            </div>
            <div class="widget-body">
                <div class="widget-main padding-2">

                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                               @* <th class="center">浏览
                                </th>*@
                                <th>入住日期
                                </th>
                                <th>离开日期
                                </th>
                                <th>房间
                                </th>
                                <th>联系人
                                </th>
                                <th>确认方式
                                </th>
                                <th>电话
                                </th>
                                <th>传真
                                </th>
                                <th>电子邮件
                                </th>
                                <th>补充说明
                                </th>
                                <th class="center">删除
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (var item in Model)
                            {
			 
                                <tr>
                                 @*   <td class="center">
                                        <a href="/Order/OrderView/@item.Id?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&r=@ViewBag.r"><span class="btn btn-xs btn-info no-border">
                                            <i class="fa fa-pencil-square-o"></i></span></a>
                                    </td>*@
                                    <td>
                                    @item.InDate.ToShortDateString()
                                    @if (!string.IsNullOrEmpty(item.InTime))
                                    {
                                        <span>&nbsp;</span>@item.InTime
                                    }
                                </td>
                                <td>
                                   @item.OutDate.ToShortDateString()
                                    @if (!string.IsNullOrEmpty(item.InTime))
                                    {
                                        <span>&nbsp;</span>@item.OutTime
                                    }
                                </td>
                                <td>
                                    @item.RoomType <span>&nbsp;</span>@item.RoomNum <span>间</span>
                                </td>
                                <td>
                                    
                                </td>
                                <td>
                                    @item.LinkName
                                </td>
                                <td>
                                    @item.LinkType
                                </td>
                                   <td>
                                       @item.Mtel 
                                       @if (string.IsNullOrEmpty(item.Tel))
                                       {
                                           <span>/</span>@item.Tel
                                       }
                                   </td>
                                <td>
                                    @item.Fax
                                </td>
                                <td>
                                    @item.Email
                                </td>
                                  <td>
                                    @item.Remark
                                </td>
                                    <td class="center">
                                        <a  class="confirm" href="/Order/Delete/@item.Id?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&r=@ViewBag.r"><span
                                            class="btn btn-xs btn-danger no-border"><i class="fa fa-trash-o"></i></span></a>
                                    </td>
                                </tr>
                                       
                            }
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>
</div>
@section js
{
    <script src="/assets/js/bootbox.min.js"></script>
    <script type="text/javascript">
        jQuery(function ($) {
            bootbox.setDefaults({ locale: "zh_CN" });
            $(".confirm").on(ace.click_event, function (e) {
                e.preventDefault();
                var link = $(this).attr("href");
                bootbox.confirm("确认删除此记录吗?", function (result) {
                    if (result) {
                        document.location.href = link;
                    }
                });
            });

        });
    </script>

}
